<table class="table table-bordered table-hover table-primary">
    <thead>
        <tr>
            <th><?php echo lang('agent:label:first_name'); ?></th>
            <th><?php echo lang('agent:label:last_name'); ?></th>
            <th><?php echo lang('agent:label:username'); ?></th>
            <th><?php echo lang('agent:label:email'); ?></th>
            <th><?php echo lang('global:active'); ?></th>
            <th><?php echo lang('global:actions'); ?></th>
        </tr>
    </thead>
    <tbody>
        <?php if (!empty($agents)): ?>
            <?php foreach ($agents as $agent): ?>
                <tr>
                    <td><?php echo $agent->first_name; ?></td>
                    <td><?php echo $agent->last_name; ?></td>
                    <td><?php echo $agent->username; ?></td>
                    <td><?php echo $agent->email; ?></td>
                    <td><?php echo ($agent->active) ? lang('global:yes') : lang('global:no'); ?></td>
                    <td class="action">
                        <a class="tooltp" data-toggle="tooltip" title="<?php echo lang('agent:button:edit_agent'); ?>" href="<?php echo site_url() . 'admin/agents/edit/' . $agent->id; ?>"><i class="icon-edit"></i></a>
                        <a class="tooltp" data-toggle="tooltip" title="<?php echo lang('agent:button:active_deactive_agent'); ?>" href="<?php echo ($agent->active) ? site_url() . 'admin/agents/deactivate/' . $agent->id : site_url() . 'admin/agents/activate/' . $agent->id; ?>"><i class='<?php echo ($agent->active) ? 'icon-check' : 'icon-check-empty'; ?>'></i></a>
                        <a class="tooltp" data-toggle="tooltip" title="<?php echo lang('agent:button:delete_agent'); ?>" href="<?php echo site_url() . 'admin/agents/delete/' . $agent->id; ?>" role="button" data-bb="confirm"><i class="icon-trash"></i></a>
                    </td>
                </tr>
            <?php endforeach; ?>
        <?php else: ?>
            <tr>
                <td colspan="6"><?php echo lang('agent:none'); ?></td>
            </tr>
        <?php endif; ?>
    </tbody>
</table>